package com.jo.factory;

import org.springframework.util.Assert;

/**
 * 默认的通过classPath查找配置文件的applicationContext
 * @author Jo
 * @date 2017/8/22
 */
public class ClassPathXmlApplicationContext extends DefaultBeanFactory {

    public ClassPathXmlApplicationContext(String configLocation) throws RuntimeException {
        setConfigLocation(configLocation);
        refresh();
    }

    public void setConfigLocation(String configLocation) {
        Assert.hasText(configLocation, "config location 不能为空");
        this.configLocation = configLocation;
    }
}
